//package io.renren.modules.study.service.impl;
//
//import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
//import io.renren.modules.study.dao.BaseSubjectMapper;
//import io.renren.modules.study.dao.EventMapper;
//import io.renren.modules.study.entity.BaseSubject;
//import io.renren.modules.study.service.BaseSubjectService;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Service;
//
//import java.util.ArrayList;
//import java.util.Arrays;
//import java.util.List;
//
//@Service
//public class BaseSubjectServiceImpl<T extends BaseSubject> extends ServiceImpl<BaseSubjectMapper<T>, T> implements BaseSubjectService<T> {
//    @Autowired
//    private EventMapper eventMapper;
//
//    @Override
//    public List<BaseSubject> getSubjects(Long subjectId) {
//        List<BaseSubject> events = new ArrayList<>();
//        List<String> tableNames = Arrays.asList("subject_a", "subject_b");
//        for (String tableName : tableNames) {
//            List<BaseSubject> eventsByTableName = eventMapper.selectSubjectsByEventId(subjectId, tableName);
//            events.addAll(eventsByTableName);
//        }
//        return events;
//
//    }
//}
